<div class="setting com_width">
    <?php include PROJECT_PATH . 'Application/View/menu.tpl.php';?>
    <div class="menu_head"></div>
    <div class="right">
		<textarea id="noticecontent" class="multtext notice"><?=$content?></textarea>
        <div class="errmsg" id="errmsg"></div>
        <div class="info">
            <input id="modeladd" class="btn btn_input btn_modify" type="button" value="确 认 修 改">
        </div>
    </div>
</div>
<script type="text/javascript">
    $("#modeladd").click(function(){
        $("#errmsg").text("");
        $.ajax({
              url: "http://<?=HOST?>/notice/doEdit",
              cache: false,
              timeout:10000,
              type: "POST",
              data: {
            	  content:$("#noticecontent").val()
              },
              dataType: "json",
              beforeSend: function() {
                  disableHTML(true, '请稍等，处理中……', true);
              },
              success: function(data) {
                  if(data.errCode != 0){
                      disableHTML(true, data.errMsg, false);
                      setTimeout(disableHTML,2000);
                        $("#errmsg").text(data.errMsg);
                  }else{
                      disableHTML(true, '编辑成功', true);
                      setTimeout("location.href = 'http://<?=HOST?>/notice/edit'", 500);
                  }
              },
              error:function(){
                      disableHTML(true, "请求出错，请重试或联系系统管理员", false);
                      setTimeout(disableHTML,2000);
                  }
            });
    });
</script>
